<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axiethernet: xaxiethernet_mcdma_ping_req_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axiethernet
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxiethernet__mcdma__ping__req__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxiethernet_mcdma_ping_req_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a Axi Ethernet MCDMA Ping request example in polled mode. </p>
<p>This example will generate a ping request for the specified IP address.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>The local IP address is set to 10.10.70.6. User needs to update LocalIpAddr variable with a free IP address based on the network on which this example is to be run.</p>
<p>The Destination IP address is set to 10.10.70.3. User needs to update DestIpAddress variable with any valid IP address based on the network on which this example is to be run.</p>
<p>The local MAC address is set to 0x000A35030201. User can update LocalMacAddr variable with a valid MAC address. The first three bytes contains the manufacture ID. 0x000A35 is XILINX manufacture ID.</p>
<p>This program will generate the specified number of ping request packets as defined in "NUM_OF_PING_REQ_PKTS".</p>
<p>This example got validated only for SGMII based design's.</p>
<p>Functional guide to example:</p>
<ul>
<li>SendArpReqFrame demonstrates the way to send the ARP request packets in the polling mode</li>
<li>SendEchoReqFrame demonstrates the way to send the ICMP/ECHO request packets in the polling mode</li>
<li>ProcessRecvFrame demonstrates the way to process the received packet. This function sends the echo request packet based on the ARP reply packet.</li>
</ul>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
5.5   adk               Initial Release
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2e50836bb991394b1e93b4ad965ef6e6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a2e50836bb991394b1e93b4ad965ef6e6">XAE_ETHER_PROTO_TYPE_IP</a>&#160;&#160;&#160;0x0800</td></tr>
<tr class="memdesc:a2e50836bb991394b1e93b4ad965ef6e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">IP Protocol.  <a href="#a2e50836bb991394b1e93b4ad965ef6e6">More...</a><br/></td></tr>
<tr class="separator:a2e50836bb991394b1e93b4ad965ef6e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13d31d5c1389461df83e9907a959cdd1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a13d31d5c1389461df83e9907a959cdd1">XAE_ETHER_PROTO_TYPE_ARP</a>&#160;&#160;&#160;0x0806</td></tr>
<tr class="memdesc:a13d31d5c1389461df83e9907a959cdd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">ARP Protocol.  <a href="#a13d31d5c1389461df83e9907a959cdd1">More...</a><br/></td></tr>
<tr class="separator:a13d31d5c1389461df83e9907a959cdd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab04a956890eabc465c44b82fd9389907"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#ab04a956890eabc465c44b82fd9389907">XAE_ETHER_PROTO_TYPE_VLAN</a>&#160;&#160;&#160;0x8100</td></tr>
<tr class="memdesc:ab04a956890eabc465c44b82fd9389907"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLAN Tagged.  <a href="#ab04a956890eabc465c44b82fd9389907">More...</a><br/></td></tr>
<tr class="separator:ab04a956890eabc465c44b82fd9389907"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afadb7a3ebe1a563482286141d5ef8f70"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#afadb7a3ebe1a563482286141d5ef8f70">XAE_ARP_PACKET_SIZE</a>&#160;&#160;&#160;28</td></tr>
<tr class="memdesc:afadb7a3ebe1a563482286141d5ef8f70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max ARP packet size.  <a href="#afadb7a3ebe1a563482286141d5ef8f70">More...</a><br/></td></tr>
<tr class="separator:afadb7a3ebe1a563482286141d5ef8f70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a046511f6707d02e9acda3d5af533e272"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a046511f6707d02e9acda3d5af533e272">XAE_HEADER_IP_LENGTH_OFFSET</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:a046511f6707d02e9acda3d5af533e272"><td class="mdescLeft">&#160;</td><td class="mdescRight">IP Length Offset.  <a href="#a046511f6707d02e9acda3d5af533e272">More...</a><br/></td></tr>
<tr class="separator:a046511f6707d02e9acda3d5af533e272"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c5055552e5c428629f0f7e3d8cddef7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a8c5055552e5c428629f0f7e3d8cddef7">XAE_VLAN_TAG_SIZE</a>&#160;&#160;&#160;4</td></tr>
<tr class="memdesc:a8c5055552e5c428629f0f7e3d8cddef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLAN Tag Size.  <a href="#a8c5055552e5c428629f0f7e3d8cddef7">More...</a><br/></td></tr>
<tr class="separator:a8c5055552e5c428629f0f7e3d8cddef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aaf84d3b715ff479f4e30283a333b8666"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aaf84d3b715ff479f4e30283a333b8666">AxiEthernetPingReqExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u16 AxiEthernetDeviceId, u16 AxiMcDmaDeviceId)</td></tr>
<tr class="memdesc:aaf84d3b715ff479f4e30283a333b8666"><td class="mdescLeft">&#160;</td><td class="mdescRight">The entry point for the AxiEthernet driver to ping request example in polled mode.  <a href="#aaf84d3b715ff479f4e30283a333b8666">More...</a><br/></td></tr>
<tr class="separator:aaf84d3b715ff479f4e30283a333b8666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60888e6a2546c817646effd7a8aea059"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a60888e6a2546c817646effd7a8aea059">SendArpReqFrame</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:a60888e6a2546c817646effd7a8aea059"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function will send a ARP request packet.  <a href="#a60888e6a2546c817646effd7a8aea059">More...</a><br/></td></tr>
<tr class="separator:a60888e6a2546c817646effd7a8aea059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eee66388f971848ac8687fdd9d94438"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a6eee66388f971848ac8687fdd9d94438">SendEchoReqFrame</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:a6eee66388f971848ac8687fdd9d94438"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function will send a Echo request packet.  <a href="#a6eee66388f971848ac8687fdd9d94438">More...</a><br/></td></tr>
<tr class="separator:a6eee66388f971848ac8687fdd9d94438"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a2d5cb91ae8cdcd2bacd2849692e2c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aa8a2d5cb91ae8cdcd2bacd2849692e2c">ProcessRecvFrame</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:aa8a2d5cb91ae8cdcd2bacd2849692e2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function will process the received packet.  <a href="#aa8a2d5cb91ae8cdcd2bacd2849692e2c">More...</a><br/></td></tr>
<tr class="separator:aa8a2d5cb91ae8cdcd2bacd2849692e2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main function of the Ping Request example in polled mode.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="afadb7a3ebe1a563482286141d5ef8f70"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_ARP_PACKET_SIZE&#160;&#160;&#160;28</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Max ARP packet size. </p>

</div>
</div>
<a class="anchor" id="a13d31d5c1389461df83e9907a959cdd1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_ETHER_PROTO_TYPE_ARP&#160;&#160;&#160;0x0806</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ARP Protocol. </p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aa8a2d5cb91ae8cdcd2bacd2849692e2c">ProcessRecvFrame()</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a60888e6a2546c817646effd7a8aea059">SendArpReqFrame()</a>.</p>

</div>
</div>
<a class="anchor" id="a2e50836bb991394b1e93b4ad965ef6e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_ETHER_PROTO_TYPE_IP&#160;&#160;&#160;0x0800</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IP Protocol. </p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aa8a2d5cb91ae8cdcd2bacd2849692e2c">ProcessRecvFrame()</a>, <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a60888e6a2546c817646effd7a8aea059">SendArpReqFrame()</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a6eee66388f971848ac8687fdd9d94438">SendEchoReqFrame()</a>.</p>

</div>
</div>
<a class="anchor" id="ab04a956890eabc465c44b82fd9389907"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_ETHER_PROTO_TYPE_VLAN&#160;&#160;&#160;0x8100</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>VLAN Tagged. </p>

</div>
</div>
<a class="anchor" id="a046511f6707d02e9acda3d5af533e272"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_HEADER_IP_LENGTH_OFFSET&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IP Length Offset. </p>

</div>
</div>
<a class="anchor" id="a8c5055552e5c428629f0f7e3d8cddef7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAE_VLAN_TAG_SIZE&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>VLAN Tag Size. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aaf84d3b715ff479f4e30283a333b8666"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetPingReqExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiEthernetDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiMcDmaDeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The entry point for the AxiEthernet driver to ping request example in polled mode. </p>
<p>This function will generate specified number of request packets as defined in "NUM_OF_PING_REQ_PKTS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the AXI MCDMA component. </td></tr>
    <tr><td class="paramname">AxiEthernetDeviceId</td><td>is Device ID of the Axi Ethernet Device , typically XPAR_&lt;AXIETHERNET_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">AxiMcDmaDeviceId</td><td>is Device ID of the Axi DMAA Device , typically XPAR_&lt;AXIMCDMA_instance&gt;_DEVICE_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_FAILURE to indicate failure, otherwise it will return XST_SUCCESS.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>AxiMcdma hardware must be initialized before initializing AxiEthernet. Since AxiMcdma reset line is connected to the AxiEthernet reset line, a reset of AxiMcdma hardware during its initialization would reset AxiEthernet. </dd></dl>

<p>References <a class="el" href="struct_x_axi_ethernet___config.html#a34b00c1ae0534cb0e956feb2a834e820">XAxiEthernet_Config::AxiDevBaseAddress</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a58df9c31ad87109bd294fb26a8af9630">XAxiEthernet_Config::AxiDevType</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a7237b3da2b79a7dcfe714a2ebab7dcf6">XAxiEthernet_Config::AxiMcDmaChan_Cnt</a>, <a class="el" href="struct_x_axi_ethernet___config.html#ae3fc04787ba28bb14e6c2add45c0c086">XAxiEthernet_Config::BaseAddress</a>, <a class="el" href="struct_x_axi_ethernet.html#adda2f024038f99905bb2ca8ab85854eb">XAxiEthernet::Config</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a2f7746d5503d4aa101cc463706466b3d">XAxiEthernet_Config::Enable_1588</a>, <a class="el" href="xaxiethernet__example__util_8c.html#a34159f50a227387e3c9d7ea6dd3dfb17">PHY_R0_CTRL_REG</a>, <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aa8a2d5cb91ae8cdcd2bacd2849692e2c">ProcessRecvFrame()</a>, <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a60888e6a2546c817646effd7a8aea059">SendArpReqFrame()</a>, <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a6eee66388f971848ac8687fdd9d94438">SendEchoReqFrame()</a>, <a class="el" href="group__axiethernet.html#ga027d60f8fd28b519cad51e450b71c07b">XAE_RECEIVER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#ga1e81b6f5f677ed0370507c117b565b20">XAE_TRANSMITTER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#gabe257efe600df43d8148c772ea3878f9">XAxiEthernet_CfgInitialize()</a>, <a class="el" href="group__axiethernet.html#ga781a4d89a7a3a9d59ac8921ba66b353d">XAxiEthernet_LookupConfig()</a>, <a class="el" href="group__axiethernet.html#gab2298b2b1af89cf0f0a78d4fda03ed7f">XAxiEthernet_SetMacAddress()</a>, <a class="el" href="group__axiethernet.html#gae3265620b9d9b86643abe5ff5e2b7d79">XAxiEthernet_SetOptions()</a>, and <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main function of the Ping Request example in polled mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_FAILURE to indicate failure, otherwise it will return XST_SUCCESS after sending specified number of packets as defined in "NUM_OF_PING_REQ_PKTS" .</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xavb__example_8c.html#a249ec82daff032bfe981d21980bae55c">AXIETHERNET_DEVICE_ID</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aaf84d3b715ff479f4e30283a333b8666">AxiEthernetPingReqExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aa8a2d5cb91ae8cdcd2bacd2849692e2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ProcessRecvFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function will process the received packet. </p>
<p>This function sends the echo request packet based on the ARP reply packet.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS is returned when an echo reply is received. Otherwise, XST_FAILURE is returned.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This assumes MAC does not strip padding or CRC. </dd></dl>

<p>References <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a6eee66388f971848ac8687fdd9d94438">SendEchoReqFrame()</a>, <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a13d31d5c1389461df83e9907a959cdd1">XAE_ETHER_PROTO_TYPE_ARP</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a2e50836bb991394b1e93b4ad965ef6e6">XAE_ETHER_PROTO_TYPE_IP</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aaf84d3b715ff479f4e30283a333b8666">AxiEthernetPingReqExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a60888e6a2546c817646effd7a8aea059"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SendArpReqFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function will send a ARP request packet. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a13d31d5c1389461df83e9907a959cdd1">XAE_ETHER_PROTO_TYPE_ARP</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a2e50836bb991394b1e93b4ad965ef6e6">XAE_ETHER_PROTO_TYPE_IP</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aaf84d3b715ff479f4e30283a333b8666">AxiEthernetPingReqExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a6eee66388f971848ac8687fdd9d94438"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SendEchoReqFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function will send a Echo request packet. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#a2e50836bb991394b1e93b4ad965ef6e6">XAE_ETHER_PROTO_TYPE_IP</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aaf84d3b715ff479f4e30283a333b8666">AxiEthernetPingReqExample()</a>, and <a class="el" href="xaxiethernet__mcdma__ping__req__example_8c.html#aa8a2d5cb91ae8cdcd2bacd2849692e2c">ProcessRecvFrame()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
